# -*- coding:utf-8 -*-
"""
作者：520
日期：2023年12月05日
"""
import tensorflow as tf
from tensorflow.python import keras
from tensorflow.python.keras import layers

model = keras.Sequential([
    layers.Dense(3, activation='relu', kernel_initializer='he_normal', name="layer1", input_shape=(3,)),
    layers.Dense(2, activation='relu', kernel_initializer='he_normal', name="layer2"),
    layers.Dense(2,activation='sigmoid', kernel_initializer='he_normal', name="layer3")
], name="Sequential_model")
model.summary()
inputs=keras.Input(shape=(3,),name="input")
x=layers.Dense(3, activation='relu', kernel_initializer='he_normal', name="layer1")(inputs)
x=layers.Dense(2, activation='relu', kernel_initializer='he_normal', name="layer2")(x)
outputs=layers.Dense(2,activation='sigmoid', kernel_initializer='he_normal', name="output")(x)
model=keras.Model(inputs=inputs,outputs=outputs,name="Sequential_model")
model.summary()